package com.hua.designpattern.structural.flyweight;

public class Color {
	private String name;

	public Color(String name) {
		this.name = name;
	}

	@Override
	public boolean equals(Object obj) {
		if (obj instanceof Color) {
			return ((Color) obj).name.equals(name);
		}
		return super.equals(obj);
	}

	@Override
	public String toString() {
		return super.toString() + "[name=" + name + "]";
	}
}
